<template>
    <section class="search-salesman-result-mian base-main">
      <div class="search-box bgcFFF line-bottom">
        <span class="inline-block color45454D fs14" @click="handleSearch">{{text}}</span>
      </div>
      <AalesmanList
        v-if="recordData.length > 0"
        :data="recordData"
        :type="2"
      ></AalesmanList>

      <!--无搜索结果-->
      <div class="none text-c" v-if="recordData.length == 0">
        <div class="absolute-center">
          <img src="../../assets/img/img_search_none.png" alt="">
          <p>没有搜到相关内容</p>
          <p>换个关键词再试一次吧</p>
        </div>
      </div>
      <!--无搜索结果-->
    </section>
</template>

<script type="text/ecmascript-6">
  import AalesmanList from '../../components/AalesmanList.vue'

  export default {
    components:{
      AalesmanList,
    },
    data() {
      return {
        text:this.$route.query.text,
        recordData:[
          {
            id:1,
            pic:'https://p20.ssl.qhimgs3.com/dr/240_240_/t015540fc8db1807b91.jpg?t=1540843399',
            name:'张三',
            phone:'13659874254'
          },
          {
            id:2,
            pic:'https://p20.ssl.qhimgs3.com/dr/240_240_/t015540fc8db1807b91.jpg?t=1540843399',
            name:'李四',
            phone:'13659874254'
          },
          {
            id:3,
            pic:'https://p20.ssl.qhimgs3.com/dr/240_240_/t015540fc8db1807b91.jpg?t=1540843399',
            name:'王五',
            phone:'13659874254'
          },
          {
            id:4,
            pic:'https://p20.ssl.qhimgs3.com/dr/240_240_/t015540fc8db1807b91.jpg?t=1540843399',
            name:'蔡徐坤',
            phone:'13659874254'
          },

        ],//数据
      }
    },
    methods: {
      handleSearch(){
        this.$router.replace({
          path:'/index/web/searchSalesman'
        })
      }
    },
  }
</script>

<style scoped lang="scss">
  @import '../../assets/css/searchSalesmanResult.scss';
</style>
